package com.zhnl.zhnl_web.controller;

import com.alibaba.fastjson.JSONObject;
import com.zhnl.zhnl_web.service.BstMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 罗兴发
 * @data 2025/9/17 15:37
 * @description：客户留言-控制层
 */
@RestController
@CrossOrigin  //跨域
@RequestMapping("/zhnl_web")
@Slf4j
public class BstMessageController {
    @Resource
    BstMessageService bstMessageService;

    /**
     * 添加用户留言
     * @param json
     * @return
     */
    @PostMapping("/addMessage")
    public String addMessage(@RequestBody JSONObject json){
        return bstMessageService.addMessage(json);
    }
}
